{% extends "@!SonataAdmin/standard_layout.html.twig" %}

{# 头部右侧导航 #}
{% block sonata_top_nav_menu %}
    {% if app.user and is_granted(sonata_admin.adminPool.getOption('role_admin')) %}
        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
{#                {% if app_mode == 'demo' %}#}
{#                    <li>#}
{#                        <button type="button" class="btn btn-block btn-danger btn-flat" style="height: 50px; cursor: default">DEMO演示环境</button>#}
{#                    </li>#}
{#                {% endif %}#}
                <li>
                    <a href="{{ path('admin_page_create') }}"><i class="fa fa-plus"></i> </a>
                </li>
                {{ render(controller('App\\Controller\\Backend\\DefaultController::message')) }}
                {{ render(controller('App\\Controller\\Backend\\DefaultController::notification')) }}
                <li>
                    <a href="/" target="_blank"><i class="fa fa-home"></i> </a>
                </li>
                {% block sonata_top_nav_menu_user_block %}
                    {{ render(controller('App\\Controller\\Backend\\DefaultController::AdminUserInfo')) }}
                {% endblock %}
                <!-- 全局配置 -->
                <li>
                    <a href="#" data-toggle="control-sidebar"><i class="fa fa-gear"></i></a>
                </li>
            </ul>
        </div>
    {% endif %}
{% endblock %}

{# 列表页顶部操作区域 #}
{#{% block tab_menu_navbar_header %}#}

{#{% endblock %}#}

{# 头部左侧导航 #}
{#{% block sonata_breadcrumb %}#}

{#{% endblock sonata_breadcrumb %}#}

{# 左侧菜单栏 #}
{% block sonata_left_side %}
    <aside class="main-sidebar">
        <section class="sidebar">
            {% block sonata_side_nav %}
                {% block sonata_sidebar_search %}
                    {% if sonata_admin.adminPool.getOption('search') %}
                        <form action="{{ path('sonata_admin_search') }}" method="GET" class="sidebar-form"
                              role="search">
                            <div class="input-group custom-search-form">
                                <input type="text" name="q" value="{{ app.request.get('q') }}" class="form-control" placeholder="{{ 'search_placeholder'|trans({}, 'SonataAdminBundle') }}">
                                <span class="input-group-btn">
                                    <button class="btn btn-flat" type="submit">
                                        <i class="fa fa-search" aria-hidden="true"></i>
                                    </button>
                                </span>
                            </div>
                        </form>
                    {% endif %}
                {% endblock sonata_sidebar_search %}

                {% block side_bar_before_nav %} {% endblock %}

                {% block side_bar_nav %}
                    {{ render(controller('App\\Controller\\Backend\\DefaultController::AdminModule', {sonata_admin: app.request.attributes.get('_sonata_admin')})) }}
                {% endblock side_bar_nav %}

                {% block side_bar_after_nav %}
                    <p class="text-center small" style="border-top: 1px solid #444444; padding-top: 10px">
                        {% block side_bar_after_nav_content %}

                        {% endblock %}
                    </p>
                {% endblock %}
            {% endblock sonata_side_nav %}
        </section>
    </aside>
{% endblock sonata_left_side %}

{% block sonata_wrapper %}
    {{ parent() }}
    <!-- 全局配置侧边栏 -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Create the tabs -->
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
            <li class="active"><a href="#control-sidebar-general-tab" data-toggle="tab" aria-expanded="false"><i
                            class="fa fa-wrench"></i></a></li>
            <li class=""><a href="#control-sidebar-link-tab" data-toggle="tab" aria-expanded="false"><i
                            class="fa fa-link"></i></a></li>
            <li class=""><a href="#control-sidebar-settings-tab" data-toggle="tab" aria-expanded="true"><i
                            class="fa fa-gear"></i></a></li>
        </ul>
        <!-- Tab panes -->
        <div class="tab-content my-tab-content">
            <!-- Home tab content -->
            <div class="tab-pane active" id="control-sidebar-general-tab">
                <h3 class="control-sidebar-heading">General Action</h3>

            </div>
            <!-- /.tab-pane -->
            <!-- Stats tab content -->
            <div class="tab-pane" id="control-sidebar-link-tab">
                <h3 class="control-sidebar-heading">Link List</h3>

            </div>
            <!-- /.tab-pane -->
            <!-- Settings tab content -->
            <div class="tab-pane" id="control-sidebar-settings-tab">
                <h3 class="control-sidebar-heading">Settings</h3>
            </div>
            <!-- /.tab-pane -->
        </div>
    </aside>
    <!-- The sidebar's background -->
    <!-- This div must placed right after the sidebar for it to work-->
    <div class="control-sidebar-bg">

    </div>
{% endblock %}